<include file="__PUBLIC__/head.html"/>
<css file="__PUBLIC__/css/category.css"/>
<js file="__PUBLIC__/js/category.js"/>
<script>
    $(function(){
        $(".delcategory").click(function(){
            if(window.confirm("删除栏目将删除所有内容")){
                return true;
            }
            return false;
        })
    })
</script>
<style>
    body{padding: 10px;}
    .table1,.top{width: 800px;margin: 0 auto;}
    .top a {display: block;width: 150px;text-align:center;line-height: 30px;height: 30px;font-size: 18px;}
</style>   
</head>
<body>
    <div class="top">
        <a href="__APP__/category/add_show/cat_pid/0">点击添加顶级栏目</a>
    </div>
    <table class="table1">
        <thead>
            <tr>
                <td width="30" align="center">ID</td>
                <td width="240" align="center">栏目名称</td>
                <td align="center">操作</td>
            </tr>
        </thead>
        <tbody>
        <list from="$category" name="$c">
        <tr>
            <td align="center">{$c.cat_id}</td>
            <td style="text-indent:20px;"><if value="$c.cat_pid!=0">|{$c.html}</if>{$c.cat_name}</td>
    <td align="center">
        <a href="__CONTROL__/add_show/cat_pid/{$c.cat_id}">添加子栏目</a>
        |
        <a href="__CONTROL__/edit_show/cat_id/{$c.cat_id}">修改</a> |
        <a href="__CONTROL__/del/cat_id/{$c.cat_id}" class="delcategory">删除</a>     </td>
</tr>
</list>
</tbody>
</table>
</body>
</html>